<template>
  <app-gong :info="info"></app-gong>
</template>

<script>
import appGong from '@/components/app-gong'
export default {
  components: { appGong },
  data() {
    return {
      info: {},
      admList: [
        {
          title: '客户管理',
          more: '更多',
          children: [
            {
              img: '../static/workImg/u88.png',
              name: '我的任务',
              url: '/pages/index/taskList',
            },
            {
              img: '../static/workImg/u91.png',
              name: '拜访记录',
              url: '/pages/sale/visit_records',
              // url: "/pages/customer/visit"
            },
            {
              img: '../static/workImg/u94.png',
              name: '拜访填写',
              url: '/pages/sale/addvisitrecord',
              // url: "/pages/customer/my"
            },
            {
              img: '../static/workImg/u94.png',
              name: '我的客户',
              url: '/pages/client/client',
              type: 'switchTab',
              // url: "/pages/customer/my"
            },
            {
              img: '../static/workImg/u97.png',
              name: '添加客户',
              url: '/pages/customer/add',
            },
          ],
        },
        {
          title: '订单管理',
          more: '更多',
          children: [
            {
              img: '../static/workImg/u158.png',
              name: '待配送',
              type: 'switchTab',
              url: '/pages/order/order?state=1',
            },
            {
              img: '../static/workImg/u136.png',
              name: '待收款',
              type: 'switchTab',
              url: '/pages/order/order?state=2',
            },
            {
              img: '../static/workImg/u139.png',
              name: '未收完',
              type: 'switchTab',
              url: '/pages/order/order?state=3',
            },
            {
              img: '../static/workImg/u77.png',
              name: '已完成',
              type: 'switchTab',
              url: '/pages/order/order?state=4',
            },
            {
              img: '../static/workImg/u77.png',
              name: '新增订单',
              url: '/pages/sale/productstobepurchased',
            },
          ],
        },
        {
          title: '配送管理',
          more: '更多',
          children: [
            {
              img: '../static/workImg/u149.png',
              name: '配送任务',
              url: '/pages/sale/Dctask/Dctask',
            },
            {
              img: '../static/workImg/u152.png',
              name: '领货单',
              url: '/pages/sale/draw/drawRecord',
            },
            {
              img: '../static/workImg/u155.png',
              name: '车上库存',
              url: '/pages/tools/carInventory/carInventory',
            },
            {
              img: '../static/workImg/u158.png',
              name: '配送记录',
              url: '',
            },
            {
              img: '../static/workImg/u161.png',
              name: '清点入库',
              url: '/pages/manage/stock_li',
            },
          ],
        },
        {
          title: '日常工作',
          more: '更多',
          children: [
            {
              img: '../static/workImg/u149.png',
              name: '考勤打卡',
              url: '/pages/index/punchtheclock',
            },
            {
              img: '../static/workImg/u139.png',
              name: '请假申请',
              url: '/pages/index/leave',
            },
            {
              img: '../static/workImg/u133.png',
              name: '销售报表',
              url: '/pages/sale/report_select',
            },
            {
              img: '../static/workImg/u136.png',
              name: '报销审批',
              url: '/pages/sale/expense_list',
            },
            {
              img: '../static/workImg/u139.png',
              name: '在售商品',
              url: '/pages/sale/my_product',
            },
          ],
        },
      ],
    }
  },
  onShow() {
    let state = this.routeOption().options.state
    let info = this.admList[state]
    uni.setNavigationBarTitle({
      title: info.name,
    })
    this.info = info
  },
  methods: {},
}
</script>

<style lang="scss" scoped>
</style>
